<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue.js"></script>
</head>
<body>
<div id="id_div">
    <span>{{message}}</span>
    <button v-on:click="reverseStr">反转消息</button>
</div>
<script>
    const app=new Vue({
        el:"#id_div",
        data:{
            message:"Hello Vue"
        },
        methods:{
            reverseStr:function () {
                this.message=this.message.split('').reverse().join('');
            }
        }
    })
</script>
</body>
</html>